home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3dm / dmedia / dmDVIAudioEncode.z / dmDVIAudioEncode
Encoding:
Text File  |  2002-10-03  |  10.5 KB  |  199 lines

  1.  
  2.  
  3.  
  4. ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm))))                                    ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm))))
  5.  
  6.  
  7.  
  8. NNNNAAAAMMMMEEEE
  9.      dmDVIAudioEncode - compress audio data using the IMA (Interactive
  10.      Multimedia Association) Recommended ADPCM compression, based on Intel's
  11.      DVI algorithm.
  12.  
  13.  
  14. SSSSYYYYNNNNOOOOPPPPSSSSIIIISSSS
  15.      ####iiiinnnncccclllluuuuddddeeee <<<<ddddmmmmeeeeddddiiiiaaaa////ddddmmmm____aaaauuuuddddiiiioooouuuuttttiiiillll....hhhh>>>>
  16.  
  17.      DDDDMMMMssssttttaaaattttuuuussss ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((DDDDMMMMDDDDVVVVIIIIaaaauuuuddddiiiiooooeeeennnnccccooooddddeeeerrrr hhhhaaaannnnddddlllleeee,,,,
  18.                                sssshhhhoooorrrrtttt ****iiiibbbbuuuuffff,,,, uuuunnnnssssiiiiggggnnnneeeedddd cccchhhhaaaarrrr ****oooobbbbuuuuffff,,,,
  19.                                iiiinnnntttt nnnnssssaaaammmmpppplllleeeessss))))
  20.  
  21.  
  22. PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRR
  23.      _h_a_n_d_l_e    DDDDMMMMDDDDVVVVIIIIaaaauuuuddddiiiiooooeeeennnnccccooooddddeeeerrrr structure, created by a previous call to
  24.                ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeeerrrrCCCCrrrreeeeaaaatttteeee((((3333ddddmmmm)))).  It contains the state associated
  25.                with the encoder.
  26.  
  27.      _i_b_u_f      pointer to input sample data buffer.  The data format is short
  28.                (16-bit).  The samples are assumed to be two's complement.
  29.                Sampling rate could range from 8 kHz to 48 kHz.
  30.  
  31.  
  32.      _o_b_u_f      pointer to output compressed data buffer. The data format is
  33.                unsigned char (8-bit).
  34.  
  35.  
  36.      _n_s_a_m_p_l_e_s  The number of samples to be processed.  For the 4:1 algorithm
  37.                (the only one currently supported), the value of nsamples
  38.                passed to the DVI encode/decode routines must always be a
  39.                multiple of 2.
  40.  
  41.  
  42. RRRREEEETTTTUUUURRRRNNNNEEEEDDDD VVVVAAAALLLLUUUUEEEE
  43.      Returns DDDDMMMM____FFFFAAAAIIIILLLLUUUURRRREEEE or DDDDMMMM____SSSSUUUUCCCCCCCCEEEESSSSSSSS.
  44.  
  45.  
  46. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  47.      ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm)))) implements Intel, Inc.'s DVI IMA4:1 ADPCM
  48.      compression for monaural audio data.
  49.  
  50.      DVI IMA ADPCM compression exists in two forms, 4 bits per sample (IMA4:1)
  51.      and 3 bits per sample (IMA3:1).  The compression form may be retrieved
  52.      using ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeeerrrrGGGGeeeettttPPPPaaaarrrraaaammmmssss((((3333ddddmmmm)))) via the parameter
  53.      DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE.  Its possible values are:
  54.  
  55.      DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____4444BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE
  56.           4:1 compression.  This is the only form currently supported by the
  57.           SGI Digital Media libraries.
  58.  
  59.  
  60.  
  61.  
  62.  
  63.                                                                         PPPPaaaaggggeeee 1111
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm))))                                    ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm))))
  71.  
  72.  
  73.  
  74.      DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____3333BBBBIIIITTTTSSSS____PPPPEEEERRRR____SSSSAAAAMMMMPPPPLLLLEEEE
  75.           3:1 compression.  Currently not supported.
  76.  
  77. DDDDVVVVIIII AAAAUUUUDDDDIIIIOOOO FFFFIIIILLLLEEEE BBBBLLLLOOOOCCCCKKKK MMMMOOOODDDDEEEE
  78.      DVI audio compression uses a linear prediction scheme.  This means that
  79.      the compressed bits are interrelated or interdependent.  If a application
  80.      seeks to an offset into the compressed bit stream file and then starts
  81.      reading at that point in the stream and decompresses it via
  82.      ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooDDDDeeeeccccooooddddeeee((((3333ddddmmmm)))), the interdependency of the bits at the start point
  83.      is lost.  The application will initially get back data with a lower
  84.      amplitude than if he had read the same data back during a complete pass
  85.      over the file from the beginning.
  86.  
  87.      In pure DVI ADPCM data, there is no way to accurately begin decoding data
  88.      in the middle of the bit stream file without starting the beginning.  Two
  89.      solutions to this problem have been developed, one by Intel, Inc. and one
  90.      by Apple, Inc.  Both involve breaking the compressed data up into blocks,
  91.      each with a small header encapsulating the information needed to allow
  92.      decoding to begin at any block boundry with no loss of data. WWWWAAAAVVVVEEEE(4) and
  93.      AAAAIIIIFFFFFFFF----CCCC format sound files using IMA DVI compression take advantage of
  94.      this block method if you create them using the Audio File Library.  In
  95.      addition, a block method compressed stream may be created using
  96.      ddddmmmmAAAACCCCCCCCoooonnnnvvvveeeerrrrtttt(3dm) if it is configured properly.
  97.  
  98. CCCCOOOONNNNFFFFIIIIGGGGUUUURRRRIIIINNNNGGGG DDDDMMMMAAAACCCC FFFFOOOORRRR BBBBLLLLOOOOCCCCKKKK MMMMOOOODDDDEEEE
  99.      Three parameters are needed to configure the DDDDMMMMaaaauuuuddddiiiiooooccccoooonnnnvvvveeeerrrrtttteeeerrrr to allow
  100.      creation of these block streams:
  101.  
  102.      DDDDMMMM____AAAAUUUUDDDDIIIIOOOO____CCCCOOOODDDDEEEECCCC____MMMMAAAAXXXX____BBBBYYYYTTTTEEEESSSS____PPPPEEEERRRR____BBBBLLLLOOOOCCCCKKKK
  103.           Indicates the number of bytes of compressed data per block,
  104.           including the header.  Indicates the number of bytes of compressed
  105.           data per block, including the header.  For AAAAIIIIFFFFFFFF----CCCC(4) files, this
  106.           value is always 34 * channel_count.  For WWWWAAAAVVVVEEEE(4) files, this value
  107.           varies.
  108.  
  109.      DDDDMMMM____AAAAUUUUDDDDIIIIOOOO____CCCCOOOODDDDEEEECCCC____FFFFRRRRAAAAMMMMEEEESSSS____PPPPEEEERRRR____BBBBLLLLOOOOCCCCKKKK
  110.           Indicates the number of frames of uncompressed data contained in
  111.           each block.  Indicates the number of frames of uncompressed data
  112.           contained in each block.  For AAAAIIIIFFFFFFFF----CCCC(4) files, this value is always
  113.           64.  For WWWWAAAAVVVVEEEE(4) files, this value varies.
  114.  
  115.      DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE
  116.           This DVI-specific parameter specifies whether the data will be
  117.           compressed using the Intel scheme, the Apple scheme, or no blocking
  118.           at all (i.e., "pure" DVI).  Its possible values are:
  119.  
  120.           DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____NNNNOOOONNNNEEEE -- For stream use only.
  121.           DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____AAAAPPPPPPPPLLLLEEEE -- For AIFF-C files.
  122.           DDDDMMMM____DDDDVVVVIIII____AAAAUUUUDDDDIIIIOOOO____BBBBLLLLOOOOCCCCKKKK____TTTTYYYYPPPPEEEE____IIIINNNNTTTTEEEELLLL -- For WAVE files.
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.                                                                         PPPPaaaaggggeeee 2222
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136. ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm))))                                    ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee((((3333ddddmmmm))))
  137.  
  138.  
  139.  
  140. IIIIMMMMPPPPOOOORRRRTTTTAAAANNNNTTTT NNNNOOOOTTTTEEEE
  141.      Stereo audio streams and streams with block data _c_a_n_n_o_t be created using
  142.      ddddmmmmDDDDVVVVIIIIAAAAuuuuddddiiiiooooEEEEnnnnccccooooddddeeee(((()))) directly -- you must use ddddmmmmAAAACCCCCCCCoooonnnnvvvveeeerrrrtttt(3dm).  It is
  143.      highly recommended that the Audio File Library be used for all to- and
  144.      from-disk compression and decompression.
  145.  
  146. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  147.      dmDVIAudioEncoderCreate(3dm), dmDVIAudioEncoderSetParams(3dm),
  148.      dmDVIAudioEncoderDestroy(3dm), dmDVIAudioEncode(3dm), dnACConvert(3dm),
  149.      afWriteFrames(3dm), IMA Recommended Practices for Enhancing Digital Audio
  150.      Compatibility in Multimedia Systems, rev 3.00.
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.                                                                         PPPPaaaaggggeeee 3333
  196.  
  197.  
  198.  
  199.